package com.qianying.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangcr
 * @date 2023/9/7 9:36
 */
@Data
@Builder
@AllArgsConstructor
public class QueryParam {

    public QueryParam() {
        selectName="*";
        isPage = true;
        curPage =1;
        beginNo = 1;
        pageSize=100;
        orderByNameList = new ArrayList<>();
        whereConditionList = new ArrayList<>();
    }

    private String selectName;
    private String tableName;
    private List<QueryConditionItemMap> whereConditionList;
    private Boolean isPage;
    private Integer pageSize;
    private Integer curPage;
    private Integer beginNo;
    /**
     * 拼接自定义字符串( select * from table [where ? 可空] + mergeCondition  ),所以自定义mergeCondition注意where条件是否为空
     */
    private String mergeCondition;
    private ArrayList<String> orderByNameList;

}
